<script type="text/x-template" id="dmp-check-step">
      <div>
          <el-steps :active="active" finish-status="success">
              <el-step title="获取请求头"></el-step>
              <el-step title="dmp请求"></el-step>
              <el-step title="主页dmp日志"></el-step>
          </el-steps>
          <dmp-check-response v-if="active === 0" />
          <dmp-check-home v-if="active === 1" />
          <div v-if="active === 2" >
              测试
          </div>
          <div style="margin:auto">
              <el-button type="primary" style="margin-top: 12px;" @click="prev" v-if="active === 1 || active === 2">上一步</el-button>
              <el-button type="primary" style="margin-top: 12px;" @click="next" v-if="active === 0 || active === 1">下一步</el-button>
              <el-button type="success" style="margin-top: 12px;" v-if="active === 2" >完成</el-button>
          </div>
      </div>
</script>

<script>
    Vue.component('dmp-check-step', {
        template: '#dmp-check-step',
        data() {
            return {
                active: 0
            }
        },
        computed: {},
        methods: {
            prev(){
               --this.active
                if (this.active < 0){
                   this.active=0
                }
            },
            next(){
                if (this.active++ > 3){
                   this.active=0
                }
            }
        },
        created() {

        }
    })
</script>
